<template>
    <div class="container">
        <div class="body_wrap">
            <el-card shadow="hover" ref="content_card">
                <el-card class="table_tool_bar_wrap" shadow="never" style="margin-bottom: 10px">
                    华智OA数据导入项目管理系统
                </el-card>

                <el-card class="table_tool_bar_wrap" shadow="never" style="margin-bottom: 10px">
                    <div class="base_wrap">
                        <div class="left">
                            <el-button @click="post" type="primary" size="medium" icon="el-icon-s-operation">
                                导入岗位数据
                            </el-button>
                            <el-button @click="depart" type="primary" size="medium" icon="el-icon-s-operation">
                                导入部门数据
                            </el-button>
                            <el-button @click="emps" type="primary" size="medium" icon="el-icon-s-operation">
                                导入部门及用户数据
                            </el-button>
                            <el-button @click="project" type="primary" size="medium" icon="el-icon-s-operation">
                                导入项目信息
                            </el-button>
                        </div>
                    </div>
                </el-card>


            </el-card>
        </div>

    </div>
</template>

<script>
export default {
    components: {
    },

    data() {
        return {
            form: {
                excel: null
            }
        };
    },

    created() {

    },

    mounted() {
        this.$nextTick(() => {});
    },

    methods: {

        async project() {
            this.loading = true;
            const res = await this.$http({
                url: "/init/importIeasyProject2PmgProject",
                method: "GET",
                params: {}
            });
            if (this.ResultMessage(res, false)) {
                console.log(res.data);
            }
        },

        async depart() {
            this.loading = true;
            const res = await this.$http({
                url: "/init/listWithTree",
                method: "GET",
                params: {}
            });
            if (this.ResultMessage(res, false)) {
                console.log(res.data);
            }
        },

        async emps() {
            this.loading = true;
            const res = await this.$http({
                url: "/init/deptEmps",
                method: "GET",
                params: {}
            });
            if (this.ResultMessage(res, false)) {
                console.log(res.data);
            }
        },

        async post() {
            this.loading = true;
            const res = await this.$http({
                url: "/init/listWithTreePost",
                method: "GET",
                params: {}
            });
            if (this.ResultMessage(res, false)) {
                console.log(res.data);
            }
        },

    }
};
</script>

<style lang="scss" scoped>
</style>
